package com.digitalchina.lxnsy.viewholder;

import android.view.View;
import android.view.ViewGroup;
import android.widget.TextView;

import com.digitalchina.lxnsy.R;
import com.digitalchina.lxnsy.entity.CafProblemVO;
import com.jude.easyrecyclerview.adapter.BaseViewHolder;

/**
 * ================================================
 * 项目名称：BigData
 * 类描述：
 * 包名：com.digitalchina.bigdata.viewholder
 * 创建人：郑皓
 * 创建时间：2017/10/27 13:10
 * 修改备注：
 * ================================================
 */

public class CafMainHolder extends BaseViewHolder<CafProblemVO> {

    private TextView tvTitle;
    private View view;


    public CafMainHolder(ViewGroup parent) {
        super(parent, R.layout.item_caf_main);
        tvTitle = $(R.id.item_caf_tv_title);
        view = $(R.id.view);
    }

    @Override
    public void setData(CafProblemVO data) {
        super.setData(data);

        if(data.isSelect()){
            tvTitle.setVisibility(View.GONE);
            view.setVisibility(View.GONE);
        }else{
            tvTitle.setText(data.getProblemTitle() + "");
            tvTitle.setVisibility(View.VISIBLE);
            view.setVisibility(View.VISIBLE);
        }

    }

}
